package me.jtx.poplar.user.model.repository;

import me.jtx.poplar.core.data.BaseJpaRepository;
import me.jtx.poplar.user.model.entity.User;

/**
 * DD Repository for User related actions and events
 *
 * @author: Tong Huazhong(jsyzthz@gmail.com)
 * @copyright: &copy; 2016, Tong Huazhong
 */
public interface UserRepository extends BaseJpaRepository<User, Long> {
	/**
	 * Finds a user with the given email
	 *
	 * @param email
	 * @return
	 */
	public User findByEmail(String email);

	/**
	 * Finds a user with the given username
	 *
	 * @param username
	 * @return
	 */
	public User findByUsername(String username);
}
